Out of range dates#200
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe pull request adds out-of-range date handling for spreadsheet parsing. Rust code returns unsupported years as ISO 8601 strings, with tests covering future XLSX and past ODS dates. Project dependencies and IDE ignores are also updated. ChangesOut-of-range date conversion and testing
Estimated code review effort: 2 (Simple) | ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/types/cell.rs`:
- Around line 33-34: The year bounds check incorrectly treats years 1..=1000 as
invalid; in the code around the date formatting where v.year() is checked (the
branch that sets formatted = v.format("%Y-%m-%d").to_string()), change the
condition from v.year() > 9999 || v.year() <= 1000 to use v.year() > 9999 ||
v.year() < 1 so that years in the valid Python datetime range [1,9999] are
preserved instead of being downgraded to string form.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c601af5a-b81b-4566-bf02-13740a3125a3
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.locktests/data/out_of_range_dates.xlsxis excluded by!**/*.xlsx
📒 Files selected for processing (5)
.gitignorerequirements.txtsrc/types/cell.rstests/data/out_of_range_dates.odstests/test_out_of_range_dates.py
|
Hi. According to 4.1.2.4 ISO8601 such dates should use extended representation (with sign and agreed additional years digits). I suggest to return a tuple of ints or just float/decimal in this case. |
Summary by CodeRabbit
Bug Fixes
Ttime separator for datetime).Chores
Tests